package ${package.Service}.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import ${package.Entity}.${table.entityName};
import ${package.Service}.I${table.entityName}Service;
import ${package.Mapper}.${table.entityName}Mapper;
import org.springframework.stereotype.Service;
import com.qianya.model.common.CommonResult;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianya.model.common.ResultCode;
/**
* <p>
*  ${table.comment!}服务实现类
* </p>
*
* @author ${author}
* @since ${date}
*/
@Service
public class ${table.entityName}ServiceImpl extends ServiceImpl<${table.entityName}Mapper, ${table.entityName}> implements I${table.entityName}Service {

        /**
        *查找 ${table.comment!}
        * @author ${author}
        * @since ${date}
        */
        @Override
        public CommonResult find(${table.entityName} ${table.entityName?uncap_first}) {
            IPage iPage = null;
            return CommonResult.success(iPage);
        }
        /**
        * 新增 ${table.comment!}
        * @author ${author}
        * @since ${date}
        */
        @Override
        public CommonResult create(${table.entityName} ${table.entityName?uncap_first}) {
            boolean b = save(${table.entityName?uncap_first});
            if (b){
                return CommonResult.success();
            }
            return CommonResult.error(ResultCode.ERROR,"操作失败");
        }
        /**
        * 修改 ${table.comment!}
        * @author ${author}
        * @since ${date}
        */
        @Override
        public CommonResult renewal(${table.entityName} ${table.entityName?uncap_first}) {
            boolean b = updateById(${table.entityName?uncap_first});
            if (b){
                return CommonResult.success();
            }
            return CommonResult.error(ResultCode.ERROR,"操作失败");
        }


}
